<?php
/**
 * Created by PhpStorm.
 * User: tangchao
 * Date: 19-4-20
 * Time: 下午4:52
 */

namespace Lib;


class UserProxy implements IUserProxy
{
    public function getUserName($id)
    {
        $db = Factory::getDataBase('slave');
        $db->query('select name from user where id = $id');

    }

    public function setUserName($id, $name)
    {
        $db = Factory::getDataBase('master');
        $db->query('update user set name = "{$name}" where id = {$id}');
    }
}